-
Notifications
You must be signed in to change notification settings - Fork 267
fix: array to array cast #2897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: array to array cast #2897
Conversation
864a25f to
92a7867
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2897 +/- ##
============================================
+ Coverage 56.12% 59.53% +3.40%
- Complexity 976 1376 +400
============================================
Files 119 167 +48
Lines 11743 15496 +3753
Branches 2251 2569 +318
============================================
+ Hits 6591 9225 +2634
- Misses 4012 4971 +959
- Partials 1140 1300 +160 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Created #2914 for the failed test |
|
Submitted #2916 to fix the failed test. |
92a7867 to
5f7b017
Compare
| Ok(cast_with_options(&array, to_type, &CAST_OPTIONS)?) | ||
| (List(from), List(to)) | ||
| if can_cast_types(from_type, to_type) | ||
| || (matches!(from.data_type(), Decimal128(_, _)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only case where we have a spark cast but no DF/arrow cast?
| } | ||
|
|
||
| private def generateArrays(rowSize: Int, elementType: DataType): DataFrame = { | ||
| private def generateArrays(rowNum: Int, elementType: DataType): DataFrame = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : might be an unintended change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended since rowNum (meaning the number of rows) makes more sense to me.
Which issue does this PR close?
Part of #2766
Rationale for this change
What changes are included in this PR?
How are these changes tested?
Added tests.